package com.zy.kotlinbaselibrary.base.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.zy.kotlinbaselibrary.base.mvp.MvpRxFragment


/**
 * Created by zy on 2018/5/2.
 */

abstract class BaseFragment : MvpRxFragment() {


    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val mRootView =  inflater.inflate(getLayoutId(), null, false)
        return mRootView
    }


    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        initData()
        initEvent()
    }



    override fun onDestroyView() {
        super.onDestroyView()
    }


    abstract fun getLayoutId(): Int

    abstract fun initData()

    abstract fun initEvent()
}
